// JavaScript Document

function cambiar()
{
  var index=document.getElementById("cmbFormaPago").selectedIndex
  if (index==0)efectivo()
  if (index==1)cheque()
  if (index==2)deposito()
  if (index==3)tarjetaCredito()
  if (index==4)tarjetaDebito()
  if (index==5)transferenciaBancaria()
  if (index==6)anticipo()
  // Efectivo
  
}
function cheque()
{
   document.getElementById("numeroCuenta").value="";
  document.getElementById("numeroDocumento").value="";
  //document.getElementById("").value="";
  document.getElementById("monto").value="";
  form1.numeroDocumento.disabled = false;
  document.getElementById("numeroDocumento").style.backgroundColor="#FFFFFF";
  form1.bancoCliente.disabled = false;
  document.getElementById("bancoCliente").style.backgroundColor="#FFFFFF";
  document.getElementById("crearBanco").style.visibility = "visible";
  form1.bancoCompania.disabled = true;
  form1.numeroCuenta.disabled = false;
  document.getElementById("tarjeta").style.visibility = "hidden";
  document.getElementById("et1").style.visibility = "hidden";
  document.getElementById("et2").style.visibility = "hidden";
  document.getElementById("et3").style.visibility = "hidden";
  document.getElementById("porcentaje").style.visibility = "hidden";
  document.getElementById("anticipo").style.visibility = "hidden";
  document.getElementById("montoTotal").style.visibility = "hidden";
  document.getElementById("numeroCuenta").style.backgroundColor="#FFFFFF";
  form1.numeroDocumento.focus();
}
function efectivo()
{
  
  document.form1.monto.disabled=false; 
  document.form1.numeroDocumento.disabled = true;
  document.form1.bancoCliente.disabled = true;
  document.form1.bancoCompania.disabled = true;
  document.form1.numeroCuenta.disabled = true;
  //document.getElementById("monto").style.color="#EEEEEE";Color de letras de las cajas de texto
  //document.getElementById("bancoCliente").value=""; valor
  document.getElementById("numeroDocumento").value="";
  document.getElementById("numeroCuenta").value="";
  //document.getElementById("monto").value="";
  document.getElementById("bancoCliente").style.backgroundColor="#EEEEEE";
  document.getElementById("numeroDocumento").style.backgroundColor="#EEEEEE";
  document.getElementById("bancoCompania").style.backgroundColor="#EEEEEE";
  document.getElementById("numeroCuenta").style.backgroundColor="#EEEEEE";
  document.getElementById("crearBanco").style.visibility = "hidden";//boton No visible
  document.getElementById("et1").style.visibility = "hidden";
  document.getElementById("et2").style.visibility = "hidden";
  document.getElementById("et3").style.visibility = "hidden";
  document.getElementById("anticipo").style.visibility = "hidden";
  document.getElementById("porcentaje").style.visibility = "hidden";
  document.getElementById("montoTotal").style.visibility = "hidden";
  document.getElementById("tarjeta").style.visibility = "hidden";//tarjeta de credito no visible
  //document.getElementById("ad").style.visibility = "hidden";//Etiqueta no visible
  document.getElementById("monto").style.backgroundColor="#FFFFFF";
  form1.monto.focus();
  //form1.monto.style.background-color="#CCCC66";
   
}
function deposito()
{ 
  document.getElementById("numeroDocumento").value="";
  document.getElementById("monto").value="";
  document.getElementById("numeroCuenta").value="";
  form1.numeroDocumento.disabled = false;
  form1.bancoCliente.disabled = true;
  document.getElementById("bancoCliente").style.backgroundColor="#EEEEEE";
  document.getElementById("numeroDocumento").style.backgroundColor="#FFFFFF";
  form1.bancoCompania.disabled = false;
  document.getElementById("crearBanco").style.visibility = "hidden";
  document.getElementById("bancoCompania").style.backgroundColor="#FFFFFF";
  document.form1.numeroCuenta.disabled = true;
  document.getElementById("numeroCuenta").style.backgroundColor="#EEEEEE";
  document.getElementById("et1").style.visibility = "hidden";
  document.getElementById("et2").style.visibility = "hidden";
  document.getElementById("et3").style.visibility = "hidden";
  document.getElementById("porcentaje").style.visibility = "hidden";
  document.getElementById("anticipo").style.visibility = "hidden";
  document.getElementById("montoTotal").style.visibility = "hidden";
  document.getElementById("tarjeta").style.visibility = "hidden";
  
  form1.monto.focus();

}
function tarjetaCredito()
{
  document.getElementById("numeroDocumento").value="";
  document.getElementById("monto").value="";
  document.getElementById("numeroCuenta").value="";
  form1.numeroDocumento.disabled = false;
  form1.bancoCompania.disabled = false;
  document.getElementById("crearBanco").style.visibility = "visible";
  form1.numeroCuenta.disabled = false;
  form1.bancoCliente.disabled = false;
  document.getElementById("bancoCliente").style.backgroundColor="#FFFFFF";
  document.getElementById("bancoCompania").style.backgroundColor="#FFFFFF";
  document.getElementById("numeroCuenta").style.backgroundColor="#FFFFFF";
  document.getElementById("numeroDocumento").style.backgroundColor="#FFFFFF";
  document.getElementById("tarjeta").style.visibility = "visible";
  document.getElementById("et1").style.visibility = "visible";
  document.getElementById("anticipo").style.visibility = "hidden";
  document.getElementById("et2").style.visibility = "visible";
  document.getElementById("et3").style.visibility = "visible";
  document.getElementById("porcentaje").style.visibility = "visible";
  document.getElementById("montoTotal").style.visibility = "visible";
  
 // form1.tarjeta.visible=true;
  form1.numeroDocumento.focus();

}
function tarjetaDebito()
{
  document.getElementById("numeroDocumento").value="";
  document.getElementById("monto").value="";
  document.getElementById("numeroCuenta").value="";
  form1.numeroDocumento.disabled = false;
  form1.bancoCompania.disabled = false;
  document.getElementById("crearBanco").style.visibility = "visible";
  form1.numeroCuenta.disabled = false;
  form1.bancoCliente.disabled = false;
  document.getElementById("bancoCliente").style.backgroundColor="#FFFFFF";
  document.getElementById("bancoCompania").style.backgroundColor="#FFFFFF";
  document.getElementById("numeroCuenta").style.backgroundColor="#FFFFFF";
  document.getElementById("numeroDocumento").style.backgroundColor="#FFFFFF";
  document.getElementById("tarjeta").style.visibility = "hidden";
  document.getElementById("et1").style.visibility = "hidden";
  document.getElementById("anticipo").style.visibility = "hidden";
  document.getElementById("et2").style.visibility = "hidden";
  document.getElementById("et3").style.visibility = "hidden";
  document.getElementById("porcentaje").style.visibility = "hidden";
  document.getElementById("montoTotal").style.visibility = "hidden";
 // form1.tarjeta.visible=true;
  form1.numeroDocumento.focus();

}

function transferenciaBancaria()
{
}

function anticipo()
{
  document.getElementById("numeroDocumento").value="";
  document.getElementById("numeroCuenta").value="";
  form1.numeroDocumento.disabled = true;
  document.getElementById("numeroDocumento").style.backgroundColor="#EEEEEE";
  form1.bancoCliente.disabled = true;
  document.getElementById("bancoCliente").style.backgroundColor="#FFFFFF";
  document.getElementById("crearBanco").style.visibility = "hidden";
  form1.bancoCompania.disabled = true;
  form1.numeroCuenta.disabled = true;
  document.getElementById("numeroCuenta").style.backgroundColor="#EEEEEE";
  form1.monto.disabled = true;
  document.getElementById("monto").value="";
  document.getElementById("monto").style.backgroundColor="#EEEEEE";
  document.getElementById("tarjeta").style.visibility = "hidden";
  document.getElementById("et1").style.visibility = "hidden";
  document.getElementById("et2").style.visibility = "hidden";
  document.getElementById("et3").style.visibility = "hidden";
  document.getElementById("anticipo").style.visibility = "visible";
  document.getElementById("porcentaje").style.visibility = "hidden";
  document.getElementById("montoTotal").style.visibility = "hidden"; 
}


</script>
</head>

<body  onload="javascript:cargarDefault();">
